package cn.lg.soar.system.general.model;

import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;

/**
 * @author luguoxiang
 * @date 2021/11/21
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ApiModel("登录配置")
@Getter
@Setter
public class LoginConfigDTO {
    /**
     * 是否开启验证码
     */
    private Boolean captcha;
    /**
     * 最大错误次数
     */
    private Integer maxFailCount;
    /**
     * 首次错误次数
     */
    private Integer firstFailCount;
    /**
     * 锁定间隔
     */
    private Integer failInterval;

    public Integer getMaxFailCount() {
        return maxFailCount == null ? 255 : maxFailCount;
    }

    public Integer getFirstFailCount() {
        return firstFailCount == null ? 5 : firstFailCount;
    }

    public Integer getFailInterval() {
        return failInterval == null ? 300 : failInterval;
    }
}
